package cn.wolfcode.wms.mapper;

import cn.wolfcode.wms.domain.Employee;
import cn.wolfcode.wms.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee entity);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee entity);

//    分页查询
    List<Employee> queryForList(QueryObject qo);
//    维护关系
    void insertRealtion(@Param("employeeId")Long employeeId,@Param("roleId")Long roleId);
//    破坏关系
    void deleteRealtion(Long employeeId);

    Employee login(@Param("username") String username,@Param("password") String password);

    //    通过登录用户的id查询所拥有的权限
    List<String> selectExpressionByEmployeeId(Long id);

}